 import excel "/Users/emilienpaulis/Library/CloudStorage/Dropbox/KBR information/POLICY AGREEMENT PAPER/replication_data.xlsx", sheet("Feuil1") firstrow clear

**** DEPENDENT VARIABLE: SUPPORT FOR THE IMPLEMENTATION OF THE KBR RECOMMENDATIONS ****
*** I first rescaled the scale from 1-11 to 0 to 10

gen var1 = implementation_p1 - 1
drop implementation_p1
rename var1 implementation_p1

gen var1 = implementation_p2 - 1
drop implementation_p2
rename var1 implementation_p2

gen var1 = implementation_p3 - 1
drop implementation_p3
rename var1 implementation_p3

gen var1 = implementation_p4 - 1
drop implementation_p4
rename var1 implementation_p4

gen var1 = implementation_p5 - 1
drop implementation_p5
rename var1 implementation_p5

*** I then built the average scale of acceptance for the implementation
alpha implementation_p1-implementation_p5, gen(implementation)

**** INDEPENDENT VARIABLE I: AGREEMENT WITH THE CCA's RECOMMENDATIONS ****
*** I first rescaled the scale from 1-11 to 0 to 10
gen var1 = agreement_p1 - 1
drop agreement_p1
rename var1 agreement_p1

gen var1 = agreement_p2 - 1
drop agreement_p2
rename var1 agreement_p2

gen var1 = agreement_p3 - 1
drop agreement_p3
rename var1 agreement_p3

gen var1 = agreement_p4 - 1
drop agreement_p4
rename var1 agreement_p4

gen var1 = agreement_p5 - 1
drop agreement_p5
rename var1 agreement_p5

*** I then built the average scale of agreement with the KBR recommendations
alpha agreement_p1-agreement_p5, gen(agreement)

*** I then identified the climate policy winners/losers 
gen agreement_bin=.
replace agreement_bin = 1 if agreement > 4.4
replace agreement_bin = 0 if agreement <= 4.4

gen agreement_p1_bin=.
replace agreement_p1_bin = 1 if agreement_p1 > 3.7
replace agreement_p1_bin = 0 if agreement_p1 <= 3.7

gen agreement_p2_bin=.
replace agreement_p2_bin = 1 if agreement_p2 > 4.7
replace agreement_p2_bin = 0 if agreement_p2 <= 4.7

gen agreement_p3_bin=.
replace agreement_p3_bin = 1 if agreement_p3 > 4.6
replace agreement_p3_bin = 0 if agreement_p3 <= 4.6

gen agreement_p4_bin=.
replace agreement_p4_bin = 1 if agreement_p4 > 4.3
replace agreement_p4_bin = 0 if agreement_p4 <= 4.3

gen agreement_p5_bin=.
replace agreement_p5_bin = 1 if agreement_p5 > 4.0
replace agreement_p5_bin = 0 if agreement_p5 <= 4.0

**** INDEPENDENT VARIABLE II: EVALUATION OF CCAs ****
*** Sortition battery: I first reverse some items to ensure that higher value = more positive regarding DMP representativeness and inclusiveness
revrs sortition1

*** Process: reverse to ensure higher value = higher DMP support
revrs process

*** Participants' battery: I first reverse some items to ensure that higher value = more positive regarding participants
revrs participant1 participant3 participant5

factor revparticipant1 participant2 revparticipant3 participant4 revparticipant5 participant6 participant7 revsortition1 sortition2 sortition3 revprocess

alpha revparticipant1 participant2 revparticipant3 participant4 revparticipant5 participant6 participant7 revsortition1 sortition3 revprocess, gen (process_evaluation)

**** CONTROL VARIABLES ****

*** Climate skepticism 
* The likert scale goes from 1 - fully agree to 5 - fully disagree. I first reverse  some items so that the higher the value, the more skeptics
revrs climate_skep1 climate_skep2 climate_skep3 climate_skep4 climate_skep5 climate_skep6 
* I then run a factor analysis (all items load onto one single dimension, except item5)
factor revclimate_skep1-revclimate_skep6 climate_skep7-climate_skep10
* I then build an average scale (item 5 removed; Cronbach alpha = .80; mean = 2.3)
alpha revclimate_skep1-revclimate_skep5 climate_skep7-climate_skep10, gen(climate_skepticism)

*** Political interest: I reverse to make higher value = very interested
revrs interest
drop interest
rename revinterest interest

*** Income security: I reverse to make highe value = more security
revrs income
drop income
rename revincome income

***** MAIN MODEL: ANALYSES

reg implementation agreement process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results.doc, replace ctitle (single) alpha(0.001, 0.01, 0.05) stats(coef se)

coefplot, xline(0) drop(_cons interest swd lrsp efficacy income education age gender)

reg implementation ib(1).agreement_bin process_evaluation ib(1).agreement_bin#c.process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender

outreg2 using results.doc, append ctitle (interaction) alpha(0.001, 0.01, 0.05) stats(coef se)

margins agreement_bin, at(process_evaluation=(1(1)5))

**** ROBUSTNESS CHECKS #1: ANALYSES BY POLICY PROPOSAL

reg implementation_p1 agreement_p1 process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal-single.doc, replace ctitle (Proposal 1) alpha(0.001, 0.01, 0.05) stats(coef se)
reg implementation_p2 agreement_p2 process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal-single.doc, append ctitle (Proposal 2) alpha(0.001, 0.01, 0.05) stats(coef se)
reg implementation_p3 agreement_p3 process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal-single.doc, append ctitle (Proposal 3) alpha(0.001, 0.01, 0.05) stats(coef se)
reg implementation_p4 agreement_p4 process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal-single.doc, append ctitle (Proposal 4) alpha(0.001, 0.01, 0.05) stats(coef se)
reg implementation_p5 agreement_p5 process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal-single.doc, append ctitle (Proposal 5) alpha(0.001, 0.01, 0.05) stats(coef se)


reg implementation_p1 ib(1).agreement_p1_bin process_evaluation ib(1).agreement_p1_bin#c.process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal.doc, replace ctitle (Proposal 1) alpha(0.001, 0.01, 0.05) stats(coef se)

margins agreement_p1_bin, at(process_evaluation=(1(1)5))
marginsplot
graph save margins_p1

reg implementation_p2 ib(1).agreement_p2_bin process_evaluation ib(1).agreement_p2_bin#c.process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal.doc, append ctitle (Proposal 2) alpha(0.001, 0.01, 0.05) stats(coef se)

margins agreement_p2_bin, at(process_evaluation=(1(1)5))
marginsplot
graph save margins_p2

reg implementation_p3 ib(1).agreement_p3_bin process_evaluation ib(1).agreement_p3_bin#c.process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal.doc, append ctitle (Proposal 3) alpha(0.001, 0.01, 0.05) stats(coef se)

margins agreement_p3_bin, at(process_evaluation=(1(1)5))
marginsplot
graph save margins_p3

reg implementation_p4 ib(1).agreement_p4_bin process_evaluation ib(1).agreement_p4_bin#c.process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal.doc, append ctitle (Proposal 4) alpha(0.001, 0.01, 0.05) stats(coef se)

margins agreement_p4_bin, at(process_evaluation=(1(1)5))
marginsplot
graph save margins_p4

reg implementation_p5 ib(1).agreement_p5_bin process_evaluation ib(1).agreement_p5_bin#c.process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using results-proposal.doc, append ctitle (Proposal 5) alpha(0.001, 0.01, 0.05) stats(coef se)

margins agreement_p5_bin, at(process_evaluation=(1(1)5))
marginsplot
graph save margins_p5

graph combine margins_p1.gph margins_p2.gph margins_p3.gph margins_p4.gph margins_p5.gph

**** ROBUSTNESS CHECKS #2: MAIN MODEL W/ PROCEDURAL QUALITY MEASURED IN W2

** I first computed the same IV but in W2
*** Sortition battery: I first reverse some items to ensure that higher value = more positive regarding DMP representativeness and inclusiveness
revrs sortition1_w2

*** Process: reverse to ensure higher value = higher DMP support
revrs process_w2

*** Participants' battery: I first reverse some items to ensure that higher value = more positive regarding participants
revrs participant1_w2 participant3_w2 participant5_w2

factor revparticipant1_w2 participant2_w2 revparticipant3_w2 participant4_w2 revparticipant5_w2 participant6_w2 participant7_w2 revsortition1_w2 sortition2_w2 sortition3_w2 revprocess_w2

alpha revparticipant1_w2 participant2_w2 revparticipant3_w2 participant4_w2 revparticipant5_w2 participant6_w2 participant7_w2 revsortition1_w2 sortition3_w2 revprocess_w2, gen (process_evaluation_w2)

** I then re-estimate the main model with this operationalization

reg implementation agreement process_evaluation_w2 climate_skepticism interest swd lrsp efficacy income education age gender
outreg2 using robustness_check2.doc, replace ctitle (single) alpha(0.001, 0.01, 0.05) stats(coef se)

reg implementation ib(1).agreement_bin process_evaluation_w2 ib(1).agreement_bin#c.process_evaluation_w2 climate_skepticism interest swd lrsp efficacy income education age gender

outreg2 using robustness_check2.doc, append ctitle (interaction) alpha(0.001, 0.01, 0.05) stats(coef se)

margins agreement_bin, at(process_evaluation=(1(1)5))

**** ROBUSTNESS CHECKS #2: MAIN MODEL W/ CONTROLS MEASURED IN W2
** General acceptance: I first reverse to ensure higher value = more acceptance
revrs acceptance_w2

** KBR outcome favorable: I first reverse to ensure higher value = perceive KBR will deliver favorable outcome
revrs outcome_fav_w2

reg implementation agreement process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender revprocess_w2 revacceptance_w2 revoutcome_fav_w2
outreg2 using robustness_check3.doc, replace ctitle (single) alpha(0.001, 0.01, 0.05) stats(coef se)

reg implementation ib(1).agreement_bin process_evaluation ib(1).agreement_bin#c.process_evaluation climate_skepticism interest swd lrsp efficacy income education age gender revprocess_w2 revacceptance_w2 revoutcome_fav_w2

outreg2 using robustness_check3.doc, append ctitle (interaction) alpha(0.001, 0.01, 0.05) stats(coef se)

margins agreement_bin, at(process_evaluation=(1(1)5))
